/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.thienloc.omap.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author GiangLT
 */
@Entity
@Table(name = "KQXS_LINK", catalog = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "KqxsLink.findAll", query = "SELECT k FROM KqxsLink k"),
    @NamedQuery(name = "KqxsLink.findById", query = "SELECT k FROM KqxsLink k WHERE k.id = :id"),
    @NamedQuery(name = "KqxsLink.findByCity", query = "SELECT k FROM KqxsLink k WHERE k.city = :city"),
    @NamedQuery(name = "KqxsLink.findByTime2Open", query = "SELECT k FROM KqxsLink k WHERE k.time2Open = :time2Open"),
    @NamedQuery(name = "KqxsLink.findByLink", query = "SELECT k FROM KqxsLink k WHERE k.link = :link"),
    @NamedQuery(name = "KqxsLink.findByPattern", query = "SELECT k FROM KqxsLink k WHERE k.pattern = :pattern")})
public class KqxsLink implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID")
    private Integer id;
    @Size(max = 40)
    @Column(name = "CITY")
    private String city;
    @Size(max = 40)
    @Column(name = "TIME_2_OPEN")
    private String time2Open;
    @Size(max = 600)
    @Column(name = "LINK")
    private String link;
    @Size(max = 600)
    @Column(name = "PATTERN")
    private String pattern;

    public KqxsLink() {
    }

    public KqxsLink(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getTime2Open() {
        return time2Open;
    }

    public void setTime2Open(String time2Open) {
        this.time2Open = time2Open;
    }

    public String getLink() {
        return link;
    }

    public void setLink(String link) {
        this.link = link;
    }

    public String getPattern() {
        return pattern;
    }

    public void setPattern(String pattern) {
        this.pattern = pattern;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof KqxsLink)) {
            return false;
        }
        KqxsLink other = (KqxsLink) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.thienloc.omap.entity.KqxsLink[ id=" + id + " ]";
    }
    
}
